package cn.yunbamboos.db.metadata;

import cn.yunbamboos.mybatis.annotation.FieldType;

/**列*/
public class ColumnMetadata {
    // 列名称
    private final String name;
    // 类型
    private final FieldType type;
    // 长度
    private final int length;
    // 注释
    private final String comment;

    private final int sort;

    private final boolean primaryKey;

    public ColumnMetadata(String name, FieldType type, int length, String comment,int sort, boolean primaryKey) {
        this.name = name;
        this.type = type;
        this.length = length;
        this.comment = comment;
        this.sort = sort;
        this.primaryKey = primaryKey;
    }

    public String getName() {
        return name;
    }

    public FieldType getType() {
        return type;
    }

    public int getLength() {
        return length;
    }

    public String getComment() {
        return comment;
    }

    public int getSort() {
        return sort;
    }

    public boolean isPrimaryKey() {
        return primaryKey;
    }

}
